import React, { Component } from 'react'
import { Layout, Menu, Breadcrumb, Icon } from 'antd';
import  TMDFields from './TMDFields'
const { Header, Content, Footer, Sider } = Layout;
const { SubMenu } = Menu;




export class Manager extends Component {

  constructor(props) {
    super(props)
    this.state = {
      visible: false,
      loading: false,
      collapsed: false
    }
  }
  addOneFieldToForm=()=>{

  }
  componentWillMount() {
    console.log('123');
    this.props.getAllFields();
  }
  render() {
    const { Header, Content, Footer } = Layout;
    let {fieldList}=this.props.fields;
    return (
      <Layout >

    <Content style={{ padding: '10px 40px' }}>
      <Breadcrumb style={{ margin: '12px 0' }}>
        <Breadcrumb.Item>自定义表单</Breadcrumb.Item>
        <Breadcrumb.Item>表单字段管理</Breadcrumb.Item>
      </Breadcrumb>
      <Layout style={{ padding: '24px 0', background: '#fff' }}>
        <Sider width={300} style={{ background: '#fff' }}>
          <TMDFields 
              addOneFieldToForm={this.addOneFieldToForm} 
              addOneField={this.props.addOneField}
              fieldList={fieldList}
            />
        </Sider>
        <Content style={{ padding: '0 24px', minHeight: 280 }}>
          
        </Content>

      </Layout>
    </Content>

      </Layout>
    );

  }
}











export default Manager
